<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>mark</title>
</head>
<body>
	<form name = "fm">
		<table>
			<tr>
				<td>姓名:</td>
				<td><input type = "text" name = "userName" id = "userName"></td>
			</tr>
			<tr>
				<td>性别:</td>
				<td>			
					<input type = "radio" name = "sex" id = "sex1" value = "男" checked ="checked">男&nbsp;&nbsp;
					<input type = "radio" name = "sex" id = "sex2" value = "女">女
				</td>
			</tr>
			<tr>
				<td>爱好:</td>
				<td>
					<input type = "checkbox" name = "hobby" id = "hobby1" value = "篮球">篮球&nbsp;&nbsp;
					<input type = "checkbox" name = "hobby" id = "hobby2" value = "乒乓球">乒乓球&nbsp;&nbsp;
					<input type = "checkbox" name = "hobby" id = "hobby3" value = "羽毛球">羽毛球
				</td>
			</tr>
		</table>
		<input type = "button" name = "button1" value = "submit" onClick = "check()">
	</form>
</body>
</html>
<script>
	function check() {
		if(!confirm("are you sure")){
			return;
		} 
		document.fm.method = "post";
		document.fm.action = "myTest02.jsp";
		document.fm.submit();
		
	}
</script>